
import { checkForm } from './formRuler'
// isBoolean:true, // 是否为Boolean类型, 参数是否必须为boolen类型，不是根据options个数判断，是根据后台字段类型要求判断
const auditConfig = [
  {
    value: '',
    type: 'title',
    id: '',
    children: [
      {
        value: '',
        placeholder: '请输入',
        param: 'name',
        rule: {
          required: true,
          trigger: ["blur"],
          validator: checkForm,
          msg1: '请输入节点名称!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "节点名称",
        extra: '',
        marginLeft: 0.01,
        maxCount: 12,
        beforeText: '',
        afterText: '',
        type: 'textInput',
        associated: '',
        associatedValue: '',
      },
      {
        value: '审核人员设置',
        type: 'justTitle',
        associated: '',
        associatedValue: '',
      },
      {
        value: [] as any,
        param: 'reviewers',
        type: 'addDomain_associated',
        associated: 'addDomain',
        rule: {
          required: true,
          validator: checkForm,
          trigger: ["blur", "change"],
          msg1: '请添加审核人人员!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "",
      }, {
        value: '添加审核人员',
        placeholder: '请输入',
        param: '',
        rule: {
          required: false,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请输入节点名称!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "",
        extra: '',
        beforeText: '',
        afterText: '',
        type: 'addDomain',
        associated: '',
        associatedValue: '',
      }, {
        value: false,
        placeholder: '请输入',
        param: 'isAssignReviewers',
        rule: {
          required: false,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请输入节点名称!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否允许发起人指定接受审核人",
        size: 'small',
        extra: '',
        beforeText: '',
        afterText: '',
        type: 'switch',
        associated: '',
        associatedValue: '',
      }, {
        value: false,
        placeholder: '请输入',
        param: 'isUrgeReviewer',
        rule: {
          required: false,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请输入节点名称!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否允许发起人催办",
        size: 'small',
        extra: '',
        beforeText: '',
        afterText: '',
        type: 'switch',
        associated: '',
        associatedValue: '',
      },
      {
        value: [],
        placeholder: '请输入',
        param: 'notifyTypes',
        rule: {
          required: false,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请输入节点名称!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "",
        size: 'small',
        extra: '',
        beforeText: '',
        afterText: '',
        type: 'checkbox-group',
        checkboxOptions: [
          { label: '系统站内信', value: '1', params: 'smsNotify' },
          {
            label: '短信通知', value: '2', params: 'infoNotify',
            tips: '若用户手机信息未录入或错误，短信将不能正常发送；手机短信服务开启后才能发送短信'
          },
          {
            label: '邮件通知', value: '3', params: 'mailNotify',
            tips: '若用户邮箱未录入或错误，邮件将不能正常发送；邮件服务开启后才能发送邮件'
          },
        ],
        associated: 'isUrgeReviewer',
        associatedValue: true,
      },

      {
        value: false,
        placeholder: '请输入',
        param: 'isRevoke',
        rule: {
          required: false,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请输入节点名称!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否允许发起人撤回",
        size: 'small',
        extra: '',
        beforeText: '',
        afterText: '',
        type: 'switch',
        associated: '',
        associatedValue: '',
      }, {
        value: false,
        placeholder: '请输入',
        param: 'isAutoRevoke',
        rule: {
          required: false,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否开启超时自动驳回",
        size: 'small',
        extra: '',
        beforeText: '',
        afterText: '',
        type: 'switch',
        associated: '',
        associatedValue: '',
      }, {
        value: '',
        placeholder: '请输入',
        param: 'timeout',
        rule: {
          required: true,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请输入超时时间!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "",
        size: 'small',
        extra: '',
        tips: '当该审核节点在设置时间内（单位：小时）未审核时，则自动驳回至用户初稿状态，并标记为超时未审批驳回',
        beforeText: '设置超时时间',
        afterText: '小时',
        Pleft: 0,
        min: 1,
        type: 'numberInput',
        associated: 'isAutoRevoke',
        associatedValue: true,
      }, {
        value: false,
        placeholder: '请输入',
        param: 'isEditAuditTarget',
        rule: {
          required: false,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请输入节点名称!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否允许审核人员编辑审核内容",
        size: 'small',
        extra: '',
        beforeText: '',
        afterText: '',
        type: 'switch',
        associated: '',
        associatedValue: '',
      },
      {
        value: '会签设置',
        type: 'justTitle',
        associated: '',
        associatedValue: '',
      },
      {
        value: '',
        placeholder: '请选择',
        param: 'jointlyType',
        rule: {
          required: false,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请选择允许上传的附件类型',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "会签模式:",
        title: '附会签模式',
        extra: '',
        beforeText: '',
        afterText: '',
        type: 'multipleSelect',
        options: ["一票通过", "一票否决", "按比例通过"],
        mode: 'single',
        associated: '',
        associatedValue: '',
      },
      {
        value: '',
        placeholder: '请输入',
        param: 'jointlyPassRatio',
        rule: {
          required: true,
          validator: checkForm,
          trigger: ["blur"],
          msg1: '请设置通过比例!',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "",
        size: 'small',
        extra: '',
        tips: '当审核人员的通过比例不小于设置的通过比例时，该审核节点自动通过',
        beforeText: '设置通过比例(%)',
        afterText: '',
        Pleft: 0,
        min: 1,
        max: 100,
        type: 'numberInput',
        associated: 'jointlyType',
        associatedValue: '3',
      },
    ]
  },

]
export { auditConfig }